#include "mainwindow.h"
#include "ui_mainwindow.h"

#include<QDebug>
#include<QPushButton>
#include<QInputDialog>
MainWindow::MainWindow(QWidget *parent)
    : QMainWindow(parent)
    , ui(new Ui::MainWindow)
{
    ui->setupUi(this);
//    QPushButton*button=new QPushButton(this);
    QPushButton*button2=new QPushButton(this);
//    QPushButton*button3=new QPushButton(this);
    QInputDialog*inputdialog=new QInputDialog(this);
    connect(button2,&QPushButton::clicked,[=](){
//       double d=inputdialog->getDouble(this,"输入框","浮点型");
//       int a=inputdialog->getInt(this,"输入框2","整型");
//       qDebug()<<d;
//       qDebug()<<a;
        QStringList items;
        QString s=inputdialog->getItem(this,"输入框","条目",items);
        qDebug()<<s.toUtf8().data();
    });
}

MainWindow::~MainWindow()
{
    delete ui;
}

